package sixth.group.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import sixth.group.dao.CustomerMapper;
import sixth.group.domain.Customer;
import sixth.group.service.WwzCustomerService;

@Service(value = "customerService")
public class WwzCustomerServiceImpl implements WwzCustomerService {

    @Autowired
    private CustomerMapper customerMapper;

    @Override
    public void BalanceRecharge(Integer cid,Integer money) {
//        Customer customer =new Customer();
        Customer customer=customerMapper.selectByPrimaryKey(cid);
        customer.setCid(cid);
        customer.setCbalance(money+customer.getCbalance());
        customerMapper.updateByPrimaryKeySelective(customer);
       
    }


}